from tkinter.font import names, families
# -*- coding: utf-8 -*-

class Car(object):
    def __init__(self,type,no):
        self.type = type
        self.no = no
    def start (self):
        print('我是车，我能启动')
    def stop(self):
        print('我是车，我能停止')
class Taxi(Car):
    def __init__(self,type,no,company):
        super().__init__(type,no)
        self.company=company
    def start(self):
        print("乘客您好")
        print(f'我是{self.company}出租车公司，我的车牌是{self.no}')
    def stop(self):
        print('目的地到了，欢迎下次乘坐')
class Family(Car):
    def __init__(self,type,no,name):
        super().__init__(type,no)
        self.name =name
    def start(self):
        print("我做主")
    def stop(self):
        print('目的地到了')
#测试
taxi=Taxi('上海大众','粤x8985','长城')
taxi.start()
taxi.stop()

print('-'*40)

Family_car = Family('广汽','粤8988','哈哈')
Family_car.start()
Family_car.stop()
